﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;

namespace Dmo_lc_2.Shape
{
    public class CircleShape : BaseShape
    {
        public double[] center;
        public double[] normal;
        public double radius;

        public CircleShape(Entity in_entity, Transaction tr) : base(in_entity, tr)
        {
        }

        public int weight { get; set; }

        public override void Init()
        {
            shapeType = ShapeType.CIRCLE;
            shapeTypeName = shapeType.ToString();

            Circle in_shape = (Circle)mEntity;

            color = getColor();
            center = new double[] { in_shape.Center.X, in_shape.Center.Y, in_shape.Center.Z };
            normal = new double[] { in_shape.Normal.X, in_shape.Normal.Y, in_shape.Normal.Z };
            radius = (double)in_shape.Radius;
            weight = (int)in_shape.LineWeight;
        }
    }
}